<?php

namespace Modules\Shop\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Routing\Controller;
use Illuminate\View\FileViewFinder;
use View;
use App;

class HomeController extends Controller
{

      public function __construct()
      {

          //获取配置文件中的默认模板名称
         $defaulet= \HDModule::config('admin.config.template');
         $path=[public_path('/templates/'.$defaulet)];
          //动态改变当前类找的模板初始地址
          View::setFinder(new FileViewFinder(App::make('files'),$path));
      }

    /**
     * Display a listing of the resource.
     * @return Response
     */
    public function index()
    {

        return view('index');
    }


}
